<?
require_once(dirname(dirname(dirname(__FILE__))) . "/_includes/config.php");
require_once(dirname(dirname(dirname(__FILE__))) . "/_includes/classes/paginacao.class.php");
?>

<h2>1 | Selecione a categoria</h2>

<?
$sql = "SELECT cd_categoria, ic_ordem_categoria, nm_categoria FROM categoria where cd_categoria_pai is null order by nm_categoria";
$pg = new paginacao($sql);
$pg->consulta;

$pg->cabecalho = '
  <tr class="linhaHeader">
    <td width="50">Ordem</td>
    <td>Categoria</td>
  </tr>
  ';

$pg->linha = '
  <tr class="linha<?=$c&1?>" onMouseOver="this.className=\'linhaOver\'; this.style.cursor=\'pointer\'" onMouseOut="this.className=\'linha<?=$c++&1?>\'" onClick="window.location.href=\'?cd_categoria=<?=$lst[\'cd_categoria\']. "&" . $_SERVER[\'QUERY_STRING\']?>\'">
    <td><?=$lst[\'ic_ordem_categoria\']?></td>
	<td><?=$lst[\'nm_categoria\']?></td>
  </tr>
  ';

$pg->resultado(); 
	
?>